import request from '@/utils/request'
import store from '../../store'
// 查询首页方案
export function getHomeSolutionList({
	pageNum,
	pageSize,
	isHome = true,
	categories = []
}) {

	return request({
		'url': '/solution/solutions/AppList',
		headers: {
			isToken: false
		},
		'method': 'post',
		'data': {
			isHome,
			pageNum,
			pageSize,
			userId: store.getters.id,
			categories
		}
	})
}
// 查询关注方案
export function getFocusSolutionList() {

	return request({
		'url': '/solution/recommend/AppList',
		headers: {
			isToken: true
		},
		'method': 'get',
		'params': {
			userId: store.getters.id
		}
	})
}
// 查询方案
export function getSolutionById(solutionId) {
	return request({
		url: '/solution/solutions/get',
		headers: {
			isToken: false
		},
		'method': 'get',
		'params': {
			id: solutionId,
			userId: store.getters.id
		}
	})
}